package spring;

import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

@Component("math")
@Data
public class Math {
    @Value("200")
    int n1;
    @Value("100")
    int n2;
    double result;
    public void add(){
        result=n1+n2;
        System.out.println(result);
    }
    public void subtract(){
        result=n1-n2;
        System.out.println(result);
    }
    public void plus(){
        result=n1*n2;
        System.out.println(result);
    }
}
